{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--BOOK_INFORMATION-->\n",
    "<a href=\"https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv\" target=\"_blank\"><img align=\"left\" src=\"data/cover.jpg\" style=\"width: 76px; height: 100px; background: white; padding: 1px; border: 1px solid black; margin-right:10px;\"></a>\n",
    "*This notebook contains an excerpt from the book [Machine Learning for OpenCV](https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv) by Michael Beyeler.\n",
    "The code is released under the [MIT license](https://opensource.org/licenses/MIT),\n",
    "and is available on [GitHub](https://github.com/mbeyeler/opencv-machine-learning).*\n",
    "\n",
    "*Note that this excerpt contains only the raw code - the book is rich with additional explanations and illustrations.\n",
    "If you find this content useful, please consider supporting the work by\n",
    "[buying the book](https://www.packtpub.com/big-data-and-business-intelligence/machine-learning-opencv)!*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--NAVIGATION-->\n",
    "< [Training a Deep Neural Net to Classify Handwritten Digits Using Keras](09.05-Training-a-Deep-Neural-Net-to-Classify-Handwritten-Digits-Using-Keras.ipynb) | [Contents](../README.md) | [Understanding Ensemble Methods](10.01-Understanding-Ensemble-Methods.ipynb) >"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# Combining Different Algorithms Into an Ensemble\n",
    "\n",
    "So far, we have looked at a number of interesting machine learning algorithms, from classic\n",
    "methods such as linear regression to more advanced techniques such as deep neural\n",
    "networks. At various points, we pointed out that every algorithm has its own strengths and\n",
    "weaknesses—and we took note of how to spot and overcome these weaknesses.\n",
    "\n",
    "However, wouldn't it be great if we could simply stack together a bunch of average\n",
    "classifiers to form a much stronger **ensemble** of classifiers?\n",
    "\n",
    "In this chapter, we will do just that. Ensemble methods are techniques that bind multiple\n",
    "different models together in order to solve a shared problem. Their use has become a\n",
    "common practice in competitive machine learning—making use of an ensemble typically\n",
    "improves an individual classifier's performance by a small percentage.\n",
    "\n",
    "Among these techniques are the so-called **bagging methods**, where the vote of multiple\n",
    "classifiers is averaged to make a final decision, and **boosting methods**, where one classifier\n",
    "is trying to rectify the errors made by another. One of these methods is known as **random\n",
    "forest**, which is a combination of multiple decision trees. In addition, you might already be\n",
    "familiar with **Adaptive Boosting** (also known as **AdaBoost**), a powerful boosting technique\n",
    "and popular feature of OpenCV.\n",
    "\n",
    "As we progress through the chapter, we want to find answers to the following questions:\n",
    "- How can we combine multiple models to form an ensemble classifier?\n",
    "- What are random forests and what do they have to do with decision trees?\n",
    "- What's the different between bagging and boosting?\n",
    "\n",
    "## Outline\n",
    "\n",
    "- [Understanding Ensemble Methods](10.01-Understanding-Ensemble-Methods.ipynb)\n",
    "- [Combining Decision Trees Into a Random Forest](10.02-Combining-Decision-Trees-Into-a-Random-Forest.ipynb)\n",
    "- [Using Random Forests for Face Recognition](10.03-Using-Random-Forests-for-Face-Recognition.ipynb)\n",
    "- [Implementing AdaBoost](10.04-Implementing-AdaBoost.ipynb)\n",
    "- [Combining Different Models Into a Voting Classifier](10.05-Combining-Different-Models-Into-a-Voting-Classifier.ipynb)\n",
    "\n",
    "Let's jump right in!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--NAVIGATION-->\n",
    "< [Training a Deep Neural Net to Classify Handwritten Digits Using Keras](09.05-Training-a-Deep-Neural-Net-to-Classify-Handwritten-Digits-Using-Keras.ipynb) | [Contents](../README.md) | [Understanding Ensemble Methods](10.01-Understanding-Ensemble-Methods.ipynb) >"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
